package org.jeecg.modules.manage.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;

import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description: 客户资料
 * @Author: jeecg-boot
 * @Date:   2021-11-02
 * @Version: V1.0
 */
@Data
@TableName("customer_info")
@ApiModel(value="customer_info对象", description="客户资料")
public class CustomerInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**客户编码*/
	@Excel(name = "客户编码", width = 15)
    @ApiModelProperty(value = "客户编码")
    private java.lang.String cusCode;
	/**客户名称*/
	@Excel(name = "客户名称", width = 15)
    @ApiModelProperty(value = "客户名称")
    private java.lang.String cusName;
	/**所属客户*/
	@Excel(name = "所属客户", width = 15)
    @ApiModelProperty(value = "所属客户")
    private java.lang.String pid;
	/**销售员*/
	@Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "销售员")
    private java.lang.String belongSales;
	/**公司电话*/
	@Excel(name = "公司电话", width = 15)
    @ApiModelProperty(value = "公司电话")
    private java.lang.String coPhone;
	/**联系人*/
	@Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private java.lang.String contactPerson;
	/**联系人备注*/
	@Excel(name = "联系人备注", width = 15)
    @ApiModelProperty(value = "联系人备注")
    private java.lang.String contactMark;
	/**联系人电话*/
	@Excel(name = "联系人电话", width = 15)
    @ApiModelProperty(value = "联系人电话")
    private java.lang.String contactPhone;
	/**联系人生日*/
	@Excel(name = "联系人生日", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "联系人生日")
    private java.util.Date contactBirthdate;
	/**公司邮箱*/
	@Excel(name = "公司邮箱", width = 15)
    @ApiModelProperty(value = "公司邮箱")
    private java.lang.String coEmail;
	/**公司传真*/
	@Excel(name = "公司传真", width = 15)
    @ApiModelProperty(value = "公司传真")
    private java.lang.String coFax;
	/**公司网址*/
	@Excel(name = "公司网址", width = 15)
    @ApiModelProperty(value = "公司网址")
    private java.lang.String coWebsite;
	/**公司地址*/
	@Excel(name = "公司地址", width = 15)
    @ApiModelProperty(value = "公司地址")
    private java.lang.String coAddress;
	/**客户性质*/
	@Excel(name = "客户性质", width = 15)
    @ApiModelProperty(value = "客户性质")
    private java.lang.String cusCharacteristic;
	/**客户类型*/
	@Excel(name = "客户类型", width = 15, dicCode = "cus_type")
	@Dict(dicCode = "cus_type")
    @ApiModelProperty(value = "客户类型")
    private java.lang.String cusType;
	/**VIP等级*/
	@Excel(name = "VIP等级", width = 15)
    @ApiModelProperty(value = "VIP等级")
    private java.lang.String vipLevel;
	/**默认币种*/
	@Excel(name = "默认币种", width = 15, dicCode = "currency")
	@Dict(dicCode = "currency")
    @ApiModelProperty(value = "默认币种")
    private java.lang.String currency;
	/**石重单位*/
	@Excel(name = "石重单位", width = 15)
    @ApiModelProperty(value = "石重单位")
    private java.lang.String stoneWeightUnit;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private java.lang.String remark;
	/**字印*/
	@Excel(name = "字印", width = 15)
    @ApiModelProperty(value = "字印")
    private java.lang.String mark;
	/**字印图片*/
	@Excel(name = "字印图片", width = 15)
    private transient java.lang.String markImageString;
	/**字印图片*/
    private byte[] markImage;

    public byte[] getMarkImage(){
        if(markImageString==null){
            return null;
        }
        try {
            return markImageString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getMarkImageString(){
        if(markImage==null || markImage.length==0){
            return "";
        }
        try {
            return new String(markImage,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
	/**是否有子节点*/
	@Excel(name = "是否有子节点", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否有子节点")
    private java.lang.String hasChild;
	/**状态*/
	@Excel(name = "状态", width = 15, dicCode = "tenant_status")
	@Dict(dicCode = "tenant_status")
    @ApiModelProperty(value = "状态")
    private java.lang.Integer status;
}
